SmartFTP FTP Library
|
Modifies file attributes of a file system object.
HRESULT SetStat( [in] BSTR bstrPath, [in] IFTPItem * pItem );
For further information please see "8.6. Setting File Attributes" of SSH File Transfer Protocol.
To set the last modified file time (ftpItemAttributeModifyTime) some servers (e.g. WinSSHD, JScape) require the ftpItemAttributeAccessTime attribute and AttributeAccessTime property to be set as well.
// Set file time of remote file sfFTPLib::IFTPItemPtr pItem; if(SUCCEEDED(pItem.CreateInstance(__uuidof(sfFTPLib::FTPItem))) && pItem) { pItem->ModifyTime = CFileTime::GetCurrentTime(); pItem->ValidAttributes = sfFTPLib::ftpItemAttributeModifyTime; pConnection->SetStat(_bstr_t(L"/myfile"), pItem); }
What do you think about this topic? Send feedback!
|
Copyright (c) by SmartSoft Ltd. All rights reserved.
|